package com.zhehekeji.opsys.api.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @ClassName TThemeMvpd
 * @Description TODO
 * @author chenweiliu chenwei.liu@163.com
 * @date 2016-6-6   下午2:50:37
 */
@Entity
@Table(name="t_theme_mvpd")
public class TThemeMvpd implements java.io.Serializable {

	/** 
	* @Fields serialVersionUID : TODO
	*/ 
	private static final long serialVersionUID = 5210368670419377782L;
	private Long id;
	private String movieCode;
	private String productCode;
	private Date createTime;
	private TTheme ttheme;
	private Long cpCode;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="MOVIE_CODE",length=64,nullable=true)
	public String getMovieCode() {
		return movieCode;
	}
	public void setMovieCode(String movieCode) {
		this.movieCode = movieCode;
	}
	@Column(name="PRODUCT_CODE",length=64,nullable=true)
	public String getProductCode() {
		return productCode;
	}
	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="THEME_ID")
	public TTheme getTtheme() {
		return ttheme;
	}
	public void setTtheme(TTheme ttheme) {
		this.ttheme = ttheme;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return cpCode;
	}
	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}
}

